<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>部门管理</title>
    <div th:replace="views/common/link :: link"></div>

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <div th:replace="views/common/navbar :: navbar"></div>

    <!--菜单回显-->
    <div th:replace="views/common/menu :: menu"></div>
    <div class="content-wrapper">
        <section class="content-header">
            <h1>部门管理</h1>
        </section>
        <section class="content">
            <div class="box">
                <!--高级查询--->
                <form class="form-inline" id="searchForm" action="/department/list" method="post">
                    <input type="hidden" name="currentPage" id="currentPage" value="1">
                
                <a shiro:hasPermission="department:input" href="/department/input" class="btn btn-success btn-input" style="margin: 10px">
                    <span class="glyphicon glyphicon-plus"></span> 添加
                </a>
               </form>

                <!--编写内容-->
                <div class="box-body table-responsive no-padding ">
                    <table class="table table-hover table-bordered" align="center">
                        <tr>
                            <th>编号</th>
                            <th>部门名称</th>
                            <th>部门编号</th>
                            <th>操作</th>
                        </tr>

                        <tr th:each="department,departmentStat:${pageInfo.list}">
                            <td th:text="${department.id}">2</td>
                            <td th:text="${department.name}">采购部</td>
                            <td th:text="${department.sn}">Order Department</td>
                            <td>
                                <a shiro:hasPermission="department:input" class="btn btn-info btn-xs btn-input"
                                   th:href="@{'/department/input?id='+${department.id}}">
                                    <span class="glyphicon glyphicon-pencil"></span> 编辑
                                </a>
                                <a shiro:hasPermission="department:delete" th:href="@{'/department/delete/'+${department.id}}" class="btn btn-danger btn-xs btn-delete"
                                   th:value="${department.id}" onclick="del(this);return false;">
                                    <span class="glyphicon glyphicon-trash"></span> 删除
                                </a>
                            </td>
                        </tr>
                    </table>
                    <!--分页-->
                    <div th:replace="views/common/page_plus :: page_plus(pageInfo=${pageInfo})"></div>

                </div>
            </div>
        </section>
    </div>
    <div th:replace="views/common/footer :: footer"></div>
</div>
</body>
</html>
